package com.customer.ostrich.feignApi;

import com.customer.ostrich.annotation.SelfFeignClient;
import com.customer.ostrich.controller.HelloWorld;
import feign.*;

import java.util.List;
import java.util.Map;

/**
 * @author HuTongFu
 * @description:
 * @since 2019/6/21 11:43
 */
@SelfFeignClient(url = "http://localhost:8850/nacos-provider/")
public interface CustomerClient {

    @Headers("Content-Type: application/json")
    @RequestLine(value = "POST /provider/testFeignApi")
    HelloWorld testFeignProvider();

    @RequestLine("GET /repos/{owner}/{repo}/contributors")
    List<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo);

    //    @Headers("Content-Type: application/json")
    @RequestLine(value = "POST /provider/testFeignProviderHasParameter/{id}")
    HelloWorld testFeignProviderHasParameter(@Param("id") String id);

    @RequestLine("POST /provider/testFeignProviderHasParameterB")
//    HelloWorld testFeignApiHasParameterBJson(@QueryMap Map<String, Object> queryMap);
    HelloWorld testFeignApiHasParameterBJson(@QueryMap HelloWorld helloWorld);

}
